package cn.bugstack.test;

import cn.bugstack.infrastructure.redis.IRedisService;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.redisson.api.RMap;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import javax.annotation.Resource;

@Slf4j
@RunWith(SpringRunner.class)
@SpringBootTest
public class ApiTest {
    @Resource
    private IRedisService iRedisService;
    @Test
    public void test() {
        log.info("测试完成");
    }
    @Test
    public void testRedisMap(){
        RMap<Object, Object> map = iRedisService.getMap("aaa");
        map.put(1,101);
        map.put(2,101);
        map.put(3,101);

        log.info(iRedisService.getFromMap("aaa",1).toString());

    }
}
